package apibasej.server.db;

import apibasej.shared.error.APIBaseException;
/**
 * http://code.google.com/p/apibasej/
 * 
 * @author Julio Azevedo Lessa - apibasej@gmail.com
 * 
 */
public class UtilDBException extends APIBaseException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

//	public UtilDBException() {
//	}
//
	public UtilDBException(String message) {
		super(message);
	}
//
//	public UtilDBException(Throwable cause) {
//		super(cause);
//	}

	public UtilDBException(String message, Throwable cause) {
		super(message, cause);
	}
	
	/*
	private UtilDB udb;
	public String getInfoSql(){
		if(udb==null) return "";
		StringBuilder sb = new StringBuilder("SQL: "+udb.getSql()+"\n");//"TABELA: "+udb.getTable()+"\n");
		for(ObjIn in : udb.getEntries()){
			if(in.getValue() instanceof byte[])sb.append("ENTRY: "+in.getCol().getName()+"="+((byte[])in.getValue()).length+" bytes\n");
			else sb.append("ENTRY: "+in.getCol().getName()+"="+in.getValue()+"\n");
		}
		for(ObjIn in : udb.getFilters()){
			if(in.getValue() instanceof byte[])sb.append("FILTER: "+in.getCol().getName()+"="+((byte[])in.getValue()).length+" bytes\n");
			else sb.append("FILTER: "+in.getCol().getName()+"="+in.getValue()+"\n");
		}
		return sb.toString();
	}
	
	public UtilDBException(String message, Throwable cause, UtilDB udb) {
		super(message, cause);
		this.udb = udb;
	}
	*/

}
